<?php
namespace app\model;

use support\Model;

class AlarmNotification extends Model
{
    protected $table = 'alarm_notifications';
    
    protected $fillable = [
        'device_id',
        'user_id',
        'type',
        'alarm_num',
        'message',
        'status',
        'notify_type', // sms, wechat, both
        'notify_status', // pending, sent, failed
        'created_at',
        'updated_at',
        'last_send_at',
    ];

    public function device()
    {
        return $this->belongsTo(Device::class);
    }

    public function user()
    {
        return $this->belongsTo(User::class);
    }
} 